package com.example.kafka.controller;

import com.example.kafka.pojo.IndicatorDataPo;
import com.example.kafka.service.IndicatorDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/indicatorData")
public class PDController {

    @Autowired
    IndicatorDataService indicatorDataService;


    @RequestMapping(value = "/query",method = RequestMethod.GET)
    @ResponseBody
    private Object queryIndicatorList() {
        return "200";
    }

    @RequestMapping(value = "/insertOrUpdate",method = RequestMethod.GET)
    private Object insertOrUpdate(IndicatorDataPo indicatorDataPo) throws Exception {
        indicatorDataService.insertOrUpdate(indicatorDataPo);
        return "200";
    }

    @RequestMapping(value = "/deleteByIndicatorId",method = RequestMethod.GET)
    private Object deleteByIndicatorId(String indicatorId) throws Exception {
        indicatorDataService.deleteByIndicatorId(indicatorId);
        return "200";
    }

}
